home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / ispell40.lha / ispell-4.0 / configure < prev    next >
Text File  |  1993-06-01  |  20KB  |  877 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  23. # --with-PACKAGE unless this script has special code to handle it.
  24.  
  25.  
  26. for arg
  27. do
  28.   # Handle --exec-prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      # For backward compatibility, also recognize exact --exec_prefix.
  39.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  40.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  41.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  42.     next_exec_prefix=yes ;;
  43.  
  44.      -gas | --gas | --ga | --g) ;;
  45.  
  46.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  47.      -host | --host | --hos | --ho | --h)
  48.     next_host=yes ;;
  49.  
  50.      -nfp | --nfp | --nf) ;;
  51.  
  52.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  53.         no_create=1 ;;
  54.  
  55.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  56.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  57.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  58.     next_prefix=yes ;;
  59.  
  60.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  61.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  62.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  63.     next_srcdir=yes ;;
  64.  
  65.      -with-* | --with-*)
  66.        package=`echo $arg|sed 's/-*with-//'`
  67.        # Delete all the valid chars; see if any are left.
  68.        if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
  69.          echo "configure: $package: invalid package name" >&2; exit 1
  70.        fi
  71.        eval "with_`echo $package|sed s/-/_/g`=1" ;;
  72.  
  73.      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  74.        verbose=yes ;;
  75.  
  76.      *) ;;
  77.     esac
  78.   fi
  79. done
  80.  
  81. trap 'rm -f conftest* core; exit 1' 1 3 15
  82.  
  83. # Needed for some versions of `tr' so that character classes in `[]' work.
  84. if test "${LANG+set}" = "set" ; then
  85.    LANG=C
  86. fi
  87.  
  88. rm -f conftest*
  89. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  90.  
  91. # A filename unique to this package, relative to the directory that
  92. # configure is in, which we can look for to find out if srcdir is correct.
  93. unique_file=ispell.c
  94.  
  95. # Find the source files, if location was not specified.
  96. if test -z "$srcdir"; then
  97.   srcdirdefaulted=yes
  98.   # Try the directory containing this script, then `..'.
  99.   prog=$0
  100.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  101.   test "X$confdir" = "X$prog" && confdir=.
  102.   srcdir=$confdir
  103.   if test ! -r $srcdir/$unique_file; then
  104.     srcdir=..
  105.   fi
  106. fi
  107. if test ! -r $srcdir/$unique_file; then
  108.   if test x$srcdirdefaulted = xyes; then
  109.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  110.   else
  111.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  112.   fi
  113.   exit 1
  114. fi
  115. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  116. # But we can't avoid them for `..', to make subdirectories work.
  117. case $srcdir in
  118.   .|/*|~*) ;;
  119.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  120. esac
  121.  
  122. # Save the original args to write them into config.status later.
  123. configure_args="$*"
  124.  
  125. if test -z "$CC"; then
  126.   # Extract the first word of `gcc', so it can be a program name with args.
  127.   set dummy gcc; word=$2
  128.   echo checking for $word
  129.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  130.   for dir in $PATH; do
  131.     test -z "$dir" && dir=.
  132.     if test -f $dir/$word; then
  133.       CC="gcc"
  134.       break
  135.     fi
  136.   done
  137.   IFS="$saveifs"
  138. fi
  139. test -z "$CC" && CC="cc"
  140. test -n "$CC" -a -n "$verbose" && echo "    setting CC to $CC"
  141.  
  142. # Find out if we are using GNU C, under whatever name.
  143. cat > conftest.c <<EOF
  144. #ifdef __GNUC__
  145.   yes
  146. #endif
  147. EOF
  148. ${CC-cc} -E conftest.c > conftest.out 2>&1
  149. if egrep yes conftest.out >/dev/null 2>&1; then
  150.   GCC=1 # For later tests.
  151. fi
  152. rm -f conftest*
  153.  
  154. echo checking how to run the C preprocessor
  155. if test -z "$CPP"; then
  156.   CPP='${CC-cc} -E'
  157.   cat > conftest.c <<EOF
  158. #include <stdio.h>
  159. EOF
  160. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  161. if test -z "$err"; then
  162.   :
  163. else
  164.   CPP=/lib/cpp
  165. fi
  166. rm -f conftest*
  167. fi
  168.  
  169. if test -n "$GCC"; then
  170.   echo checking whether -traditional is needed
  171.   pattern="Autoconf.*'x'"
  172.   prog='#include <sgtty.h>
  173. Autoconf TIOCGETP'
  174.   cat > conftest.c <<EOF
  175. $prog
  176. EOF
  177. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  178. if egrep "$pattern" conftest.out >/dev/null 2>&1; then
  179.   need_trad=1
  180. fi
  181. rm -f conftest*
  182.  
  183.  
  184.   if test -z "$need_trad"; then
  185.     prog='#include <termio.h>
  186. Autoconf TCGETA'
  187.     cat > conftest.c <<EOF
  188. $prog
  189. EOF
  190. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  191. if egrep "$pattern" conftest.out >/dev/null 2>&1; then
  192.   need_trad=1
  193. fi
  194. rm -f conftest*
  195.  
  196.   fi
  197.   test -n "$need_trad" && CC="$CC -traditional"
  198. fi
  199.  
  200. # Make sure to not get the incompatible SysV /etc/install and
  201. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  202. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  203. # or the AFS install, which mishandles nonexistent args, or
  204. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  205. # `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
  206. # anyway.  Sigh.
  207. if test "z${INSTALL}" = "z" ; then
  208.   echo checking for install
  209.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  210.   for dir in $PATH; do
  211.     test -z "$dir" && dir=.
  212.     case $dir in
  213.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  214.     *)
  215.       if test -f $dir/installbsd; then
  216.     INSTALL="$dir/installbsd -c" # OSF1
  217.     INSTALL_PROGRAM='$(INSTALL)'
  218.     INSTALL_DATA='$(INSTALL) -m 644'
  219.     break
  220.       fi
  221.       if test -f $dir/install; then
  222.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  223.       : # AIX
  224.     else
  225.       INSTALL="$dir/install -c"
  226.       INSTALL_PROGRAM='$(INSTALL)'
  227.       INSTALL_DATA='$(INSTALL) -m 644'
  228.       break
  229.     fi
  230.       fi
  231.       ;;
  232.     esac
  233.   done
  234.   IFS="$saveifs"
  235. fi
  236. INSTALL=${INSTALL-cp}
  237. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  238. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  239.  
  240.  
  241. echo checking for BSD string and memory functions
  242. cat > conftest.c <<EOF
  243. #include <strings.h>
  244. int main() { exit(0); }
  245. int t() { rindex(0, 0); bzero(0, 0); }
  246. EOF
  247. if eval $compile; then
  248.   :
  249. else
  250.   {
  251. test -n "$verbose" && \
  252. echo '    defining' USG
  253. DEFS="$DEFS -DUSG=1"
  254. }
  255.  
  256. fi
  257. rm -f conftest*
  258.  
  259. if test "z$USG" = "z" ; then
  260.    echo checking for BSD
  261.    ( test -f /vmunix || test -f /sdmach || test -f /../../mach ) && {
  262. test -n "$verbose" && \
  263. echo '    defining' BSD
  264. DEFS="$DEFS -DBSD=1"
  265. }
  266.  
  267. fi
  268.  
  269. CHARSET="c-generic.c"
  270. if test -z "$i386_host_p"; then
  271.   # Extract the first word of `i386', so it can be a program name with args.
  272.   set dummy i386; word=$2
  273.   echo checking for $word
  274.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  275.   for dir in $PATH; do
  276.     test -z "$dir" && dir=.
  277.     if test -f $dir/$word; then
  278.       i386_host_p="t"
  279.       break
  280.     fi
  281.   done
  282.   IFS="$saveifs"
  283. fi
  284. test -z "$i386_host_p" && i386_host_p="nil"
  285. test -n "$i386_host_p" -a -n "$verbose" && echo "    setting i386_host_p to $i386_host_p"
  286.  
  287. if test "${i386_host_p}" = "t" && i386 > /dev/null 2>&1; then
  288.    CHARSET="c-ibmpc.c"
  289. fi
  290.  
  291. # Systems that have -ltermlib should use that before -ltermcap (e.g. SVR4)
  292. found_termlib=''
  293. for termlib in termlib termcap terminfo curses ; do
  294.    LIBS_save="${LIBS}"
  295. LIBS="${LIBS} -l${termlib}"
  296. have_lib=""
  297. echo checking for -l${termlib}
  298. cat > conftest.c <<EOF
  299.  
  300. int main() { exit(0); }
  301. int t() { main(); }
  302. EOF
  303. if eval $compile; then
  304.   have_lib="1"
  305. fi
  306. rm -f conftest*
  307. LIBS="${LIBS_save}"
  308. if test -n "${have_lib}"; then
  309.    :; LIBS="${LIBS} -l${termlib}"
  310. else
  311.    :; 
  312. fi
  313.  
  314.    case " ${LIBS} " in
  315.       *" -l${termlib} "* ) found_termlib=t; break ;;
  316.    esac
  317. done
  318. if test ".${found_termlib}" = "." ; then 
  319.    {
  320. test -n "$verbose" && \
  321. echo '    defining' NO_TERMCAP
  322. DEFS="$DEFS -DNO_TERMCAP=1"
  323. }
  324.  
  325. fi
  326.  
  327. LIBS_save="${LIBS}"
  328. LIBS="${LIBS} -lBSD"
  329. have_lib=""
  330. echo checking for -lBSD
  331. cat > conftest.c <<EOF
  332.  
  333. int main() { exit(0); }
  334. int t() { main(); }
  335. EOF
  336. if eval $compile; then
  337.   have_lib="1"
  338. fi
  339. rm -f conftest*
  340. LIBS="${LIBS_save}"
  341. if test -n "${have_lib}"; then
  342.    :; LIBS="${LIBS} -lBSD"
  343. else
  344.    :; 
  345. fi
  346.  
  347. LIBS_save="${LIBS}"
  348. LIBS="${LIBS} -lc"
  349. have_lib=""
  350. echo checking for -lc
  351. cat > conftest.c <<EOF
  352.  
  353. int main() { exit(0); }
  354. int t() { main(); }
  355. EOF
  356. if eval $compile; then
  357.   have_lib="1"
  358. fi
  359. rm -f conftest*
  360. LIBS="${LIBS_save}"
  361. if test -n "${have_lib}"; then
  362.    :; LIBS="${LIBS} -lc"
  363. else
  364.    :; 
  365. fi
  366.  
  367.  
  368. # Needed by Solaris 2.x to resolve references in libucb.  (and maybe other
  369. # SVR4 systems need this too?)
  370. LIBS_save="${LIBS}"
  371. LIBS="${LIBS} -lelf"
  372. have_lib=""
  373. echo checking for -lelf
  374. cat > conftest.c <<EOF
  375.  
  376. int main() { exit(0); }
  377. int t() { main(); }
  378. EOF
  379. if eval $compile; then
  380.   have_lib="1"
  381. fi
  382. rm -f conftest*
  383. LIBS="${LIBS_save}"
  384. if test -n "${have_lib}"; then
  385.    :; LIBS="${LIBS} -lelf"
  386. else
  387.    :; 
  388. fi
  389.  
  390.  
  391. # Needed for SVR4
  392. my_LIBS_save="${LIBS}"
  393. LIBS="${LIBS} -L/usr/ucblib"
  394. LIBS_save="${LIBS}"
  395. LIBS="${LIBS} -lucb"
  396. have_lib=""
  397. echo checking for -lucb
  398. cat > conftest.c <<EOF
  399.  
  400. int main() { exit(0); }
  401. int t() { main(); }
  402. EOF
  403. if eval $compile; then
  404.   have_lib="1"
  405. fi
  406. rm -f conftest*
  407. LIBS="${LIBS_save}"
  408. if test -n "${have_lib}"; then
  409.    :; LIBS="${LIBS} -lucb"
  410. else
  411.    :; LIBS="${my_LIBS_save}"
  412. fi
  413.  
  414. case " ${LIBS} " in
  415.    *' -lucb '* ) 
  416.       echo "*** Note: You may need to set LD_LIBRARY_PATH or LD_PATH to" 1>&2
  417.       echo "*** contain /usr/ucblib for the ispell executables to work." 1>&2
  418.       echo "*** (don't blame us, this is SVR4 lossage)" 1>&2
  419.      ;;
  420. esac   
  421.  
  422. echo checking for return type of signal handlers
  423. cat > conftest.c <<EOF
  424. #include <sys/types.h>
  425. #include <signal.h>
  426. #ifdef signal
  427. #undef signal
  428. #endif
  429. extern void (*signal ()) ();
  430. int main() { exit(0); }
  431. int t() { int i; }
  432. EOF
  433. if eval $compile; then
  434.   {
  435. test -n "$verbose" && \
  436. echo '    defining' RETSIGTYPE to be 'void'
  437. DEFS="$DEFS -DRETSIGTYPE=void"
  438. }
  439.  
  440. else
  441.   {
  442. test -n "$verbose" && \
  443. echo '    defining' RETSIGTYPE to be 'int'
  444. DEFS="$DEFS -DRETSIGTYPE=int"
  445. }
  446.  
  447. fi
  448. rm -f conftest*
  449.  
  450.  
  451. prog='/* Ultrix mips cc rejects this.  */
  452. typedef int charset[2]; const charset x;
  453. /* SunOS 4.1.1 cc rejects this.  */
  454. char const *const *ccp;
  455. char **p;
  456. /* AIX XL C 1.02.0.0 rejects this.
  457.    It does not let you subtract one const X* pointer from another in an arm
  458.    of an if-expression whose if-part is not a constant expression */
  459. const char *g = "string";
  460. p = &g + (g ? g-g : 0);
  461. /* HPUX 7.0 cc rejects these. */
  462. ++ccp;
  463. p = (char**) ccp;
  464. ccp = (char const *const *) p;
  465. { /* SCO 3.2v4 cc rejects this.  */
  466.   char *t;
  467.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  468.  
  469.   *t++ = 0;
  470. }
  471. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  472.   int x[] = {25,17};
  473.   const int *foo = &x[0];
  474.   ++foo;
  475. }
  476. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  477.   typedef const int *iptr;
  478.   iptr p = 0;
  479.   ++p;
  480. }
  481. { /* AIX XL C 1.02.0.0 rejects this saying
  482.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  483.   struct s { int j; const int *ap[3]; };
  484.   struct s *b; b->j = 5;
  485. }'
  486. echo checking for working const
  487. cat > conftest.c <<EOF
  488.  
  489. int main() { exit(0); }
  490. int t() { $prog }
  491. EOF
  492. if eval $compile; then
  493.   :
  494. else
  495.   {
  496. test -n "$verbose" && \
  497. echo '    defining' const to be 'empty'
  498. DEFS="$DEFS -Dconst="
  499. }
  500.  
  501. fi
  502. rm -f conftest*
  503.  
  504. if test -n "$GCC"; then
  505. echo checking for inline
  506. cat > conftest.c <<EOF
  507.  
  508. int main() { exit(0); }
  509. int t() { } inline foo() { }
  510. EOF
  511. if eval $compile; then
  512.   :
  513. else
  514.   {
  515. test -n "$verbose" && \
  516. echo '    defining' inline to be '__inline'
  517. DEFS="$DEFS -Dinline=__inline"
  518. }
  519.  
  520. fi
  521. rm -f conftest*
  522.  
  523. fi
  524.  
  525. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  526. # for constant arguments.  Useless!
  527. echo checking for working alloca.h
  528. cat > conftest.c <<EOF
  529. #include <alloca.h>
  530. int main() { exit(0); }
  531. int t() { char *p = alloca(2 * sizeof(int)); }
  532. EOF
  533. if eval $compile; then
  534.   {
  535. test -n "$verbose" && \
  536. echo '    defining' HAVE_ALLOCA_H
  537. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  538. }
  539.  
  540. fi
  541. rm -f conftest*
  542.  
  543. decl="#ifdef __GNUC__
  544. #define alloca __builtin_alloca
  545. #else
  546. #if HAVE_ALLOCA_H
  547. #include <alloca.h>
  548. #else
  549. #ifdef _AIX
  550.  #pragma alloca
  551. #else
  552. char *alloca ();
  553. #endif
  554. #endif
  555. #endif
  556. "
  557. echo checking for alloca
  558. cat > conftest.c <<EOF
  559. $decl
  560. int main() { exit(0); }
  561. int t() { char *p = (char *) alloca(1); }
  562. EOF
  563. if eval $compile; then
  564.   :
  565. else
  566.   alloca_missing=1
  567. cat > conftest.c <<EOF
  568.  
  569. #if defined(CRAY) && ! defined(CRAY2)
  570. winnitude
  571. #else
  572. lossage
  573. #endif
  574.  
  575. EOF
  576. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  577. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  578.   echo checking for _getb67
  579. cat > conftest.c <<EOF
  580. #include <ctype.h>
  581. int main() { exit(0); }
  582. int t() { 
  583. /* The GNU C library defines this for functions which it implements
  584.     to always fail with ENOSYS.  Some functions are actually named
  585.     something starting with __ and the normal name is an alias.  */
  586. #if defined (__stub__getb67) || defined (__stub____getb67)
  587. choke me
  588. #else
  589. /* Override any gcc2 internal prototype to avoid an error.  */
  590. extern char _getb67(); _getb67();
  591. #endif
  592.  }
  593. EOF
  594. if eval $compile; then
  595.   {
  596. test -n "$verbose" && \
  597. echo '    defining' CRAY_STACKSEG_END to be '_getb67'
  598. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  599. }
  600.  
  601. else
  602.   echo checking for GETB67
  603. cat > conftest.c <<EOF
  604. #include <ctype.h>
  605. int main() { exit(0); }
  606. int t() { 
  607. /* The GNU C library defines this for functions which it implements
  608.     to always fail with ENOSYS.  Some functions are actually named
  609.     something starting with __ and the normal name is an alias.  */
  610. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  611. choke me
  612. #else
  613. /* Override any gcc2 internal prototype to avoid an error.  */
  614. extern char GETB67(); GETB67();
  615. #endif
  616.  }
  617. EOF
  618. if eval $compile; then
  619.   {
  620. test -n "$verbose" && \
  621. echo '    defining' CRAY_STACKSEG_END to be 'GETB67'
  622. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  623. }
  624.  
  625. else
  626.   echo checking for getb67
  627. cat > conftest.c <<EOF
  628. #include <ctype.h>
  629. int main() { exit(0); }
  630. int t() { 
  631. /* The GNU C library defines this for functions which it implements
  632.     to always fail with ENOSYS.  Some functions are actually named
  633.     something starting with __ and the normal name is an alias.  */
  634. #if defined (__stub_getb67) || defined (__stub___getb67)
  635. choke me
  636. #else
  637. /* Override any gcc2 internal prototype to avoid an error.  */
  638. extern char getb67(); getb67();
  639. #endif
  640.  }
  641. EOF
  642. if eval $compile; then
  643.   {
  644. test -n "$verbose" && \
  645. echo '    defining' CRAY_STACKSEG_END to be 'getb67'
  646. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  647. }
  648.  
  649. fi
  650. rm -f conftest*
  651.  
  652. fi
  653. rm -f conftest*
  654.  
  655. fi
  656. rm -f conftest*
  657.  
  658. fi
  659. rm -f conftest*
  660.  
  661.  
  662. fi
  663. rm -f conftest*
  664.  
  665. if test -n "$alloca_missing"; then
  666.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  667.   # that cause trouble.  Some versions do not even contain alloca or
  668.   # contain a buggy version.  If you still want to use their alloca,
  669.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  670.   ALLOCA=alloca.o
  671.  
  672.   echo 'checking stack direction for C alloca'
  673.   echo checking whether cross-compiling
  674. # If we cannot run a trivial program, we must be cross compiling.
  675. cat > conftest.c <<EOF
  676. main(){exit(0);}
  677. EOF
  678. eval $compile
  679. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  680.   :
  681. else
  682.   cross_compiling=1
  683. fi
  684. rm -f conftest*
  685.  
  686. if test -n "$cross_compiling"
  687. then
  688.   {
  689. test -n "$verbose" && \
  690. echo '    defining' STACK_DIRECTION to be '0'
  691. DEFS="$DEFS -DSTACK_DIRECTION=0"
  692. }
  693.  
  694. else
  695. cat > conftest.c <<EOF
  696. find_stack_direction ()
  697. {
  698.   static char *addr = 0;
  699.   auto char dummy;
  700.   if (addr == 0)
  701.     {
  702.       addr = &dummy;
  703.       return find_stack_direction ();
  704.     }
  705.   else
  706.     return (&dummy > addr) ? 1 : -1;
  707. }
  708. main ()
  709. {
  710.   exit (find_stack_direction() < 0);
  711. }
  712. EOF
  713. eval $compile
  714. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  715.   {
  716. test -n "$verbose" && \
  717. echo '    defining' STACK_DIRECTION to be '1'
  718. DEFS="$DEFS -DSTACK_DIRECTION=1"
  719. }
  720.  
  721. else
  722.   {
  723. test -n "$verbose" && \
  724. echo '    defining' STACK_DIRECTION to be '-1'
  725. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  726. }
  727.  
  728. fi
  729. fi
  730. rm -f conftest*
  731. fi
  732.  
  733.  
  734. for hdr in malloc.h termios.h termio.h string.h strings.h
  735. do
  736. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  737. echo checking for ${hdr}
  738. cat > conftest.c <<EOF
  739. #include <${hdr}>
  740. EOF
  741. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  742. if test -z "$err"; then
  743.   {
  744. test -n "$verbose" && \
  745. echo '    defining' ${trhdr}
  746. DEFS="$DEFS -D${trhdr}=1"
  747. }
  748.  
  749. fi
  750. rm -f conftest*
  751. done
  752.  
  753.  
  754. echo checking for checking for broken TIOCGWINSZ
  755. cat > conftest.c <<EOF
  756.  
  757. #include <sys/ioctl.h>
  758. #ifdef HAVE_TERMIOS_H
  759. #include <termios.h>
  760. #else /* ! HAVE_TERMIOS_H */
  761. #ifdef HAVE_TERMIO_H
  762. #include <termio.h>
  763. #else /* ! HAVE_TERMIO_H */
  764. #include <sgtty.h>
  765. #endif
  766. #endif
  767.  
  768. int main() { exit(0); }
  769. int t() { 
  770. #ifdef TIOCGWINSZ
  771. struct winsize    wsize;
  772. #endif /* TIOCGWINSZ */
  773.  }
  774. EOF
  775. if eval $compile; then
  776.   :
  777. else
  778.   {
  779. test -n "$verbose" && \
  780. echo '    defining' BROKEN_TIOCGWINSZ
  781. DEFS="$DEFS -DBROKEN_TIOCGWINSZ=1"
  782. }
  783.  
  784.  
  785. fi
  786. rm -f conftest*
  787.  
  788.  
  789.  
  790. if test -n "$prefix"; then
  791.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  792.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  793. fi
  794. if test -n "$exec_prefix"; then
  795.   prsub="$prsub
  796. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%\
  797. exec_prefix\\1=\\2$exec_prefix%"
  798. fi
  799. DEFS="`echo \"$DEFS\" | sed 's%[&\\\]%\\\&%g'`"
  800.  
  801. trap 'rm -f config.status; exit 1' 1 3 15
  802. echo creating config.status
  803. rm -f config.status
  804. cat > config.status <<EOF
  805. #!/bin/sh
  806. # Generated automatically by configure.
  807. # Run this file to recreate the current configuration.
  808. # This directory was configured as follows,
  809. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  810. #
  811. # $0 $configure_args
  812.  
  813. for arg
  814. do
  815.   case "\$arg" in
  816.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  817.     exec /bin/sh $0 $configure_args ;;
  818.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  819.   esac
  820. done
  821.  
  822. trap 'rm -f Makefile; exit 1' 1 3 15
  823. CC='$CC'
  824. CPP='$CPP'
  825. INSTALL='$INSTALL'
  826. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  827. INSTALL_DATA='$INSTALL_DATA'
  828. i386_host_p='$i386_host_p'
  829. ALLOCA='$ALLOCA'
  830. CHARSET='$CHARSET'
  831. LIBS='$LIBS'
  832. srcdir='$srcdir'
  833. DEFS='$DEFS'
  834. prefix='$prefix'
  835. exec_prefix='$exec_prefix'
  836. prsub='$prsub'
  837. EOF
  838. cat >> config.status <<\EOF
  839.  
  840. top_srcdir=$srcdir
  841.  
  842. # Allow make-time overrides of the generated file list.
  843. test -n "$gen_files" || gen_files="Makefile"
  844.  
  845. for file in .. $gen_files; do if [ "x$file" != "x.." ]; then
  846.   srcdir=$top_srcdir
  847.   # Remove last slash and all that follows it.  Not all systems have dirname.
  848.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  849.   if test "$dir" != "$file"; then
  850.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  851.     test ! -d $dir && mkdir $dir
  852.   fi
  853.   echo creating $file
  854.   rm -f $file
  855.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  856.   sed -e "
  857. $prsub
  858. s%@CC@%$CC%g
  859. s%@CPP@%$CPP%g
  860. s%@INSTALL@%$INSTALL%g
  861. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  862. s%@INSTALL_DATA@%$INSTALL_DATA%g
  863. s%@i386_host_p@%$i386_host_p%g
  864. s%@ALLOCA@%$ALLOCA%g
  865. s%@CHARSET@%$CHARSET%g
  866. s%@LIBS@%$LIBS%g
  867. s%@srcdir@%$srcdir%g
  868. s%@DEFS@%$DEFS%
  869. " $top_srcdir/${file}.in >> $file
  870. fi; done
  871.  
  872. exit 0
  873. EOF
  874. chmod +x config.status
  875. test -n "$no_create" || ./config.status
  876.  
  877.